load("//devtools/tools:defaults.bzl", "ng_project", "ng_web_test_suite", "sass_binary", "ts_test_library")

package(default_visibility = ["//visibility:public"])

sass_binary(
    name = "directive_explorer_component_styles",
    src = "directive-explorer.component.scss",
)

ng_project(
    name = "directive-explorer",
    srcs = [
        "directive-explorer.component.ts",
    ],
    angular_assets = [
        "directive-explorer.component.html",
        ":directive_explorer_component_styles",
    ],
    deps = [
        "//:node_modules/@angular/cdk",
        "//:node_modules/@angular/common",
        "//:node_modules/@angular/core",
        "//:node_modules/@angular/material",
        "//:node_modules/rxjs",
        "//devtools/projects/ng-devtools/src/lib/application-operations",
        "//devtools/projects/ng-devtools/src/lib/application-services:frame_manager",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/component-data-source",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/signal-graph:signal-graph-manager",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/signals-view:signals-tab",
        "//devtools/projects/ng-devtools/src/lib/shared/object-tree-explorer:types",
        "//devtools/projects/ng-devtools/src/lib/shared/split",
        "//devtools/projects/ng-devtools/src/lib/shared/split:responsive-split",
        "//devtools/projects/protocol",
    ],
)

ts_test_library(
    name = "directive_explorer_test",
    srcs = ["directive-explorer.spec.ts"],
    deps = [
        ":directive-explorer",
        "//:node_modules/@angular/core",
        "//:node_modules/@angular/platform-browser",
        "//:node_modules/tslib",
        "//devtools/projects/ng-devtools/src/lib/application-operations",
        "//devtools/projects/ng-devtools/src/lib/application-services:frame_manager",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/breadcrumbs",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/directive-forest/index-forest",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-resolver",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/property-tab",
        "//devtools/projects/ng-devtools/src/lib/devtools-tabs/directive-explorer/signal-graph:signal-graph-manager",
        "//devtools/projects/ng-devtools/src/lib/shared/object-tree-explorer:types",
        "//devtools/projects/protocol",
    ],
)

ng_web_test_suite(
    name = "test",
    deps = [
        ":directive_explorer_test",
    ],
)
